home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk75 / ispell / src / ispell.h < prev    next >
C/C++ Source or Header  |  1995-03-19  |  5KB  |  204 lines

  1. /* -*- Mode: Text -*- */
  2.  
  3. #ifdef AMIGA
  4. #define USEDEVICES    1
  5. #ifndef BUILDHASH
  6. #define printf    printcon
  7. #undef putchar
  8. #undef getchar
  9. #define putchar putccon
  10. #define getchar getccon
  11. #endif
  12. #endif
  13.  
  14. struct dent {
  15.     struct dent *next;
  16.     char *word;
  17.  
  18.     unsigned short used : 1;
  19.  
  20. /* bit fields for all of the flags */
  21.     unsigned short v_flag : 1;
  22.         /*
  23.             "V" flag:
  24.                 ...E --> ...IVE  as in CREATE --> CREATIVE
  25.                 if # .ne. E, ...# --> ...#IVE  as in PREVENT --> PREVENTIVE
  26.         */
  27.     unsigned short n_flag : 1;
  28.         /*
  29.             "N" flag:
  30.                     ...E --> ...ION  as in CREATE --> CREATION
  31.                     ...Y --> ...ICATION  as in MULTIPLY --> MULTIPLICATION
  32.                     if # .ne. E or Y, ...# --> ...#EN  as in FALL --> FALLEN
  33.         */
  34.     unsigned short x_flag : 1;
  35.         /*
  36.             "X" flag:
  37.                     ...E --> ...IONS  as in CREATE --> CREATIONS
  38.                     ...Y --> ...ICATIONS  as in MULTIPLY --> MULTIPLICATIONS
  39.                     if # .ne. E or Y, ...# --> ...#ENS  as in WEAK --> WEAKENS
  40.         */
  41.     unsigned short h_flag : 1;
  42.         /*
  43.             "H" flag:
  44.                     ...Y --> ...IETH  as in TWENTY --> TWENTIETH
  45.                     if # .ne. Y, ...# --> ...#TH  as in HUNDRED --> HUNDREDTH
  46.         */
  47.     unsigned short y_flag : 1;
  48.         /*
  49.             "Y" FLAG:
  50.                     ... --> ...LY  as in QUICK --> QUICKLY
  51.         */
  52.     unsigned short g_flag : 1;
  53.         /*
  54.             "G" FLAG:
  55.                     ...E --> ...ING  as in FILE --> FILING
  56.                     if # .ne. E, ...# --> ...#ING  as in CROSS --> CROSSING
  57.         */
  58.     unsigned short j_flag : 1;
  59.         /*
  60.             "J" FLAG"
  61.                     ...E --> ...INGS  as in FILE --> FILINGS
  62.                     if # .ne. E, ...# --> ...#INGS  as in CROSS --> CROSSINGS
  63.         */
  64.     unsigned short d_flag : 1;
  65.         /*
  66.             "D" FLAG:
  67.                     ...E --> ...ED  as in CREATE --> CREATED
  68.                     if @ .ne. A, E, I, O, or U,
  69.                             ...@Y --> ...@IED  as in IMPLY --> IMPLIED
  70.                     if # .ne. E or Y, or (# = Y and @ = A, E, I, O, or U)
  71.                             ...@# --> ...@#ED  as in CROSS --> CROSSED
  72.                                             or CONVEY --> CONVEYED
  73.         */
  74.     unsigned short t_flag : 1;
  75.         /*
  76.             "T" FLAG:
  77.                     ...E --> ...EST  as in LATE --> LATEST
  78.                     if @ .ne. A, E, I, O, or U,
  79.                             ...@Y --> ...@IEST  as in DIRTY --> DIRTIEST
  80.                     if # .ne. E or Y, or (# = Y and @ = A, E, I, O, or U)
  81.                             ...@# --> ...@#EST  as in SMALL --> SMALLEST
  82.                                             or GRAY --> GRAYEST
  83.         */
  84.     unsigned short r_flag : 1;
  85.         /*
  86.             "R" FLAG:
  87.                     ...E --> ...ER  as in SKATE --> SKATER
  88.                     if @ .ne. A, E, I, O, or U,
  89.                             ...@Y --> ...@IER  as in MULTIPLY --> MULTIPLIER
  90.                     if # .ne. E or Y, or (# = Y and @ = A, E, I, O, or U)
  91.                             ...@# --> ...@#ER  as in BUILD --> BUILDER
  92.                                             or CONVEY --> CONVEYER
  93.         */
  94.     unsigned short z_flag : 1;
  95.         /*
  96.             "Z FLAG:
  97.                     ...E --> ...ERS  as in SKATE --> SKATERS
  98.                     if @ .ne. A, E, I, O, or U,
  99.                             ...@Y --> ...@IERS  as in MULTIPLY --> MULTIPLIERS
  100.                     if # .ne. E or Y, or (# = Y and @ = A, E, I, O, or U)
  101.                             ...@# --> ...@#ERS  as in BUILD --> BUILDERS
  102.                                             or SLAY --> SLAYERS
  103.         */
  104.     unsigned short s_flag : 1;
  105.         /*
  106.             "S" FLAG:
  107.                     if @ .ne. A, E, I, O, or U,
  108.                             ...@Y --> ...@IES  as in IMPLY --> IMPLIES
  109.                     if # .eq. S, X, Z, or H,
  110.                             ...# --> ...#ES  as in FIX --> FIXES
  111.                     if # .ne. S,X,Z,H, or Y, or (# = Y and @ = A, E, I, O, or U)
  112.                             ...# --> ...#S  as in BAT --> BATS
  113.                                             or CONVEY --> CONVEYS
  114.         */
  115.     unsigned short p_flag : 1;
  116.         /*
  117.             "P" FLAG:
  118.                     if @ .ne. A, E, I, O, or U,
  119.                             ...@Y --> ...@INESS  as in CLOUDY --> CLOUDINESS
  120.                     if # .ne. Y, or @ = A, E, I, O, or U,
  121.                             ...@# --> ...@#NESS  as in LATE --> LATENESS
  122.                                             or GRAY --> GRAYNESS
  123.         */
  124.     unsigned short m_flag : 1;
  125.         /*
  126.             "M" FLAG:
  127.                     ... --> ...'S  as in DOG --> DOG'S
  128.         */
  129.  
  130. };
  131.  
  132. #define WORDLEN 30
  133.  
  134. struct hashheader {
  135.     int magic;
  136.     int stringsize;
  137.     int tblsize;
  138. };
  139.  
  140. #define MAGIC 1
  141.  
  142.     
  143. /*
  144.  * termcap variables
  145.  */
  146. char *tgetstr();
  147. char PC;    /* padding character */
  148. char *BC;    /* backspace if not ^H */
  149. char *UP;    /* Upline (cursor up) */
  150. char *cd;    /* clear to end of display */
  151. char *ce;    /* clear to end of line */
  152. char *cl;    /* clear display */
  153. char *cm;    /* cursor movement */
  154. char *dc;    /* delete character */
  155. char *dl;    /* delete line */
  156. char *dm;    /* delete mode */
  157. char *ed;    /* exit delete mode */
  158. char *ei;    /* exit insert mode */
  159. char *ho;    /* home */
  160. char *ic;    /* insert character */
  161. char *il;    /* insert line */
  162. char *im;    /* insert mode */
  163. char *ip;    /* insert padding */
  164. char *nd;    /* non-destructive space */
  165. char *vb;    /* visible bell */
  166. char *so;    /* standout */
  167. char *se;    /* standout end */
  168. int bs;
  169. int li, co;    /* lines, columns */
  170.  
  171. char termcap[1024];
  172. char termstr[1024];    /* for string values */
  173. char *termptr;
  174.  
  175. char rootword[BUFSIZ];
  176. struct dent *lastdent;
  177.  
  178. char *hashstrings;
  179.  
  180.  
  181. #ifdef AMIGA
  182. extern int aflag;
  183. extern int lflag;
  184. #else
  185. int aflag;
  186. int lflag;
  187. #endif
  188.  
  189. struct node {
  190.     struct node *left;
  191.     struct node *right;
  192.     char *word;
  193.     int keep;
  194. };
  195.  
  196. #ifndef AMIGA  /* defined in the makefile */
  197. #define LIBDIR "/usr/local/lib"
  198. #endif
  199.  
  200. int erasechar;
  201. int killchar;
  202.  
  203. char tempfile[200];
  204.